﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectScoreEducation.aspx.cs" Inherits="Education_Report_SelectScoreEducation" %>

<%@ Register Src="../../Custom/ucEduSubject.ascx" TagName="ucEduSubject" TagPrefix="uc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>各个学校考生的得分分布查询</title>
    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" /> 
    <script language="javascript">
    //焦点移开后判断更新
    function optionSettingScore(obj)
    {
        s=true;
        var id = obj.parentElement.parentElement.id;
        var value = obj.value;

        if(value.length == 0 ||  ( /\D/.test(value)))
        {   
            obj.setAttribute("value",0); 
        }

    }
    function showView()
    {
        document.getElementById("textScore").value =document.getElementById("Text1").value; 
        document.getElementById("btnBind").click();
    }
    function GetTypeInfo()
    {
        document.getElementById('textType').value = event.srcElement.value;
    }
    function onsubChange()
    {
        document.getElementById('textSubjID').value = event.srcElement.value;
    }
    var currObj = null;
    function SetHightLight(obj)
    {
        if(obj!=null)
        {
            if(currObj!=null)
            {
                currObj.style.backgroundColor = "#ffffff";
            }
            obj.style.backgroundColor = "#fffccf";
            currObj = obj;
        }
    }
    </script> 

    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body scroll="no">
<div style="overflow-y:auto;overflow-x:none;height:98%;">
    <form id="form1" runat="server">
    <div style="padding-left:5px;">
            <div class="pageBody">
            <div class="mainWarp"  style="padding-top:5px;padding-left:5px;">
                        <table >
            <tr>
            <td  style="padding-left:4px;">
                        科目：<uc1:ucEduSubject ID="UcEduSubject1" runat="server" />
            &nbsp;&nbsp;&nbsp;查询方式:
        <select id="Select1" onchange="GetTypeInfo()">
                <option selected="selected" value=">=">得分高于</option>
                <option value="<=">得分低于</option>
            </select>
        <input id="Text1" type="text" onkeypress='return event.keyCode>=48&&event.keyCode<=57;' onfocusout='optionSettingScore(this)' maxlength=4 onpaste='return false;' style="text-align:right; width: 45px;" ondragenter='return false;' value="100"/>分
        <input id="Button1" type="button" value="查询" class="commonBut" onclick="showView()" />
            </td>
            <td style="padding-left:10px;">
                <asp:UpdateProgress ID="UpdateProgress1"  runat="server" AssociatedUpdatePanelID="UpdatePanel1"><progresstemplate><img src="../../Common/images/ajaxloading.gif" /></progresstemplate></asp:UpdateProgress>
            </td>
            </tr>
            </table><div>
                    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                    </asp:ScriptManager>
                </div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <HeaderTemplate>
                                <table id="settingTable" border="0" cellpadding="0" cellspacing="1"  style="width:450px;" class="useList">
                                <tr class="tableTitle">
                                    <th style="width:50px">排名</th>
                                    <th style="text-align:left;padding-left:5px;width:200px">学校名</th>
                                    <th style="text-align:left;padding-left:5px;width:100px">学校编号</th>
                                    <th style="text-align:right;padding-right:5px;width:100px">上线人数</th>
                                </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr  onclick='SetHightLight(this);' style="background-color: White;">
                                    <td style="width:50px"><%# Eval("RowIndex")%></td>
                                    <td style="text-align:left;padding-left:5px;width:100px"><%# Eval("SchoolName")%></td>
                                    <td style="text-align:left;padding-left:5px;width:100px"><%# Eval("SchoolCode")%></td>
                                    <td style="text-align:right;padding-right:5px;width:100px"><%# Eval("Num")%></td>
                                </tr>
                                    
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" ButtonImageAlign="left"
                            HorizontalAlign="left" OnPageChanged="AspNetPager1_PageChanged" PageSize="15"
                            PagingButtonSpacing="10px" Width="100%">
                        </webdiyer:AspNetPager>
                        <div style="display: none;">
                          <asp:Button ID="btnBind" runat="server" OnClick="btnBind_Click" Text="btnBind" />
                            <asp:TextBox ID="textSubjID" runat="server">0</asp:TextBox>
                            <asp:TextBox ID="textType" runat="server">>=</asp:TextBox>
                            <asp:TextBox ID="textScore" runat="server">600</asp:TextBox>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                
                
            </div>
        </div>
    </div>
    </form>
    </div>
</body>
</html>
<script language="javascript">
    setSubjectOnChangeFun(onsubChange);
    showView();
</script>